package pt.ist.meic.pava;

import java.util.ArrayList;



/**
 *
 * @author Antonio Massingue
 * @author Joao Matos
 * @author Nuno Santos
 *
 * This class lists the aliases referent to a trait
 *
 */
public class Aliases {

	/**
	 * The list
	 */
	private ArrayList<String> aliases;
	
	/**
	 * Constructor
	 */
	public Aliases(){
		
		aliases = new ArrayList<String>();
	}
	
	
	
	/**
	 * Add an array of aliases to the list 
	 * 
	 * @param list The array to be added to this.aliases
	 */
	public void pushAliases(String[] list){
		
		for(String a : list)
			this.aliases.add(a);
		
	}
	
	
	/**
	 * Get an alias from the list
	 * 
	 * @param index	The position of the alias on the list
	 * @return	The alias
	 */
	public String get(int index){
		
		return this.aliases.get(index);
	}
	
	
	
	/**
	 * @return The length of the list
	 */
	public int lenght(){
		
		return this.aliases.size();
	}
	
}
